Skip to content

Conversation

@valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented Jan 8, 2026

Description

Our Python 3.13 + friends environment is not solving anymore https://github.com/ESMValGroup/ESMValTool/actions/runs/20801973056/job/59748587368 but given the OSX (pure Python one) solves well, it must be something to do with friends (R, NCL, etc)

This pull request removes the R development dependencies and refers R contributors to pre-commit.

Documentation: https://esmvaltool--4306.org.readthedocs.build/en/4306/community/code_documentation.html#r


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

environment.yml Outdated
Comment on lines 125 to 127
- r-git2r # dependency of lintr
- r-lintr ==3.1.2
- r-styler ==1.10.3
- r-lintr
- r-styler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to get rid of those if we re-enable the pre-commit hook at

# - repo: https://github.com/lorenzwalthert/precommit/ # Checks for R
# rev: 'v0.4.2'
# hooks:
# - id: style-files # styler
# - id: lintr
# - repo: https://github.com/codespell-project/codespell
# rev: 'v2.3.0'
# hooks:
# - id: codespell

and perform the currently failing test using pre-commit instead.

We would just need to pin that pre-commit hook to the version where the checks passed (i.e. the version of the pre-commit hook that uses the versions of lintr and styler listed here).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all fun and games until I realized I lost you at pinning the pre-commit hook - how the heck would we know the version when that hook last passed the test? Unless you want me to write a Monte Carlo routine that loops over lintr hook versions 🤣

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not just skip the R-linting test in tests/unit/test_lint.py? I've not seen any of the following in the past 5 years:

  • anyone writing a recipe in R
  • anyone complaining that our R recipes don't follow R linting standards

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, scratch that - it's prob a good idea to have an r-lintr test, let me see what I can do with that pre-commit version, I'll toss some coins 🪙

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not forgot about this, am gonna try have a look at it tomorrow - sorry, I've been under a lot of snow elsewhere, bud

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit config file brought back to original state in a2c5d63 - off to the docs to add the mention about style etc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs modded in 88f3e41 - do we want to tell R folks to use the pre-commit way or r-linrs/styler way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes V! I pushed a few additions to the docs in fdddae6 and removed the unit test that checks compliance with lintr as we want this done with pre-commit instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I had doubts about keeping that fully skipped test, but I was afraid we'd have to use it again in the future should the R hook be left undeveloped (it diesn't look too actively maintained). Shall we merge then? 🍺

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but let's first fix the docs build

@schlunma
Copy link
Contributor

Anything I can do to help getting this merged? I can't install ESMValTool on Levante anymore because I always run into errors after 8+ hours of solving environments 😄

@valeriupredoi
Copy link
Contributor Author

Anything I can do to help getting this merged? I can't install ESMValTool on Levante anymore because I always run into errors after 8+ hours of solving environments 😄

it's just about there, Manu, remove the r-lintr and r-styler from your env on Levante, and observe the difference 😁

@valeriupredoi
Copy link
Contributor Author

docs failing is endemic, I'll look into it right now https://app.readthedocs.org/projects/esmvaltool/builds/31083499/

@valeriupredoi
Copy link
Contributor Author

docs failing is endemic, I'll look into it right now https://app.readthedocs.org/projects/esmvaltool/builds/31083499/

le greene le @bouweandela 🟢

@bouweandela bouweandela changed the title Free some dependencies to fix environment solving Remove R development dependencies Jan 22, 2026
@bouweandela bouweandela merged commit 86784c1 into main Jan 22, 2026
8 checks passed
@bouweandela bouweandela deleted the free_some_deps branch January 22, 2026 14:03
@valeriupredoi
Copy link
Contributor Author

very many thanks @bouweandela 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants